// StaticEx.cpp : implementation file
//

#include "stdafx.h"
//#include "LaserTest.h"
#include "StaticEx.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CStaticEx

CStaticEx::CStaticEx()
{
	m_brubkgnd.CreateSolidBrush(RGB(  0,0,  0)); 
}

CStaticEx::~CStaticEx()
{
}


BEGIN_MESSAGE_MAP(CStaticEx, CStatic)
	//{{AFX_MSG_MAP(CStaticEx)
	ON_WM_CTLCOLOR_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CStaticEx message handlers

HBRUSH CStaticEx::CtlColor(CDC* pDC, UINT nCtlColor) 
{
	// TODO: Change any attributes of the DC here
	HBRUSH hbr;
	
	hbr = (HBRUSH)m_brubkgnd; // Passing a Handle to the Brushm_crBkColor
	pDC->SetBkMode(TRANSPARENT);  
	
	pDC->SetBkColor(RGB(  255,0,  0)); // Setting the Color of the Text Background to the one passed by the Dialog
	pDC->SetTextColor(RGB(  255,255,  0)); // Setting the Text Color to the one Passed by the Dialog
	return hbr;
}
